package org.rc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class RoleMenu {
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;

    private Long roleId;

    private Integer menuId;

    private LocalDateTime createdTime;

    public static RoleMenu getInstance(Long roleId, Integer menuId){
        RoleMenu roleMenu = new RoleMenu();
        roleMenu.setRoleId(roleId);
        roleMenu.setMenuId(menuId);
        roleMenu.setCreatedTime(LocalDateTime.now());
        return roleMenu;
    }
}
